import request from '@/utils/request'

// 创建教师
export function createteacher(data) {
  return request({
    url: '/teachers/T_teachers/create',
    method: 'post',
    data: data
  })
}

// 更新教师
export function updateteacher(data) {
  return request({
    url: 'teachers/T_teachers/update',
    method: 'put',
    data: data
  })
}

// 删除教师
export function deleteteacher(id) {
  return request({
    url: 'teachers/T_teachers/delete?id=' + id,
    method: 'delete'
  })
}

// 获得教师
export function getteacher(id) {
  return request({
    url: 'teachers/T_teachers/get?id=' + id,
    method: 'get'
  })
}

// 获得教师分页
export function getteacherPage(params) {
  return request({
    url: 'teachers/T_teachers/teaPage',
    method: 'get',
    params
  })
}
// 导出教师 Excel
export function exportteacherExcel(params) {
  return request({
    url: 'teachers/T_teachers/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
export function getDeptList() {
  return request({
    url: 'system/dept/list-all-simple',
    method: 'get'
  })
}
export function resetPassword(id,password) {
  return request({
    url: 'teachers/T_teachers/putPassword',
    method: 'put',
   params:{id,password}
  })
}